﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IMDTO;

namespace IMDAL
{
    public class IMDALRefCodeDetail
    {
        public static String GetValueByRefCode(int idRefCode, int refCodeDetail)
        {
            // Init entity framework
            InMedioEntities entities = new InMedioEntities();

            // Get value
            String description = (from p in entities.RefCodeDetail
                                  where p.idRefCode == idRefCode && p.refCodeDetail1 == refCodeDetail
                                  select p.description).SingleOrDefault();

            return description;
        }
    }
}
